package demo1;

class Base {
    public int a = 100;
    public int b = 200;

    public void test(){
        System.out.println("Base::test()执行....");
    }

    public void test1(){
        System.out.println("Base::test1()重载");
    }

    public void methodB(){
        System.out.println("Base::methodB()...");
    }
}

class Derived extends Base {
    //int a=101;
    int b=201;
    public void methodA(){
        System.out.println("Derived::methodA()...");
    }
    public void test1(int a,int b){
        //super(a,b);
        System.out.println("Derived::test1()重载");
    }
    public void test1a(int a){
        //super(a,b);
        System.out.println("Derived::test1()重载");
    }
    public Derived() {
        System.out.println(super.a + " " + super.b);
    }
    /*public void test(){
        System.out.println("Derived::test()执行....");
    }*/

    public void method(){
        methodB();
        methodA();
    }

    public void mothod2(){
        this.test();
        super.test();
        System.out.println("Derived::mothod()执行....");
    }

}

class C extends Derived{
    public void Test(){
        System.out.println(super.a);
        System.out.println(this.a);
    }
}


public class Test1 {

    public static void main(String[] args) {
        Derived S1 = new Derived();
        //S1.test();
        //S1.mothod2();
        //C a1 = new C();
        //a1.Test();
        //S1.method();


       /* S1.test1();
        S1.test1(33,44);
        S1.test1a(55);*/



    }

}
